Skip to content

pm-console: order older held actions against newer edge-executed ones - #13652

Merged
dezren39 merged 1 commit into
mainfrom
lane-oc-code-08-13398
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-oc-code-08-13398

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Implements the ordering in #13398 (see that issue for the spec and evidence pointer).

What changes:

  • edge/src/edge.ts: tracks handed-out held IDs in a new handed KV key; sync answers mark them, acks/expiry/drop prune them. When the edge executes a kind itself and an older never-handed held action shares the subject, the edge does the older first under its own name (last-wins issue.rank: drops the older as replaced). A handed-out older blocks the newer, which is held behind it. Same-name retries go back to the host for dedup.
  • edge/src/entry.ts + edge relayed handler: a settled relayed action drops its stale hold (covers lost-answer holds).
  • test/edge.test.ts: four new tests (execute-older-first, rank-replaced, handed-blocks-newer, unrelated-through).

Verification: bun test test/edge.test.ts in pm-stack/console: 112 pass, 0 fail.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T19:38:07Z",
    "session_id": "ses_e5df655c3b1ffeX2sOGrq3PCJD",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/fleet/oc-code-08-13398-20261123T185609Z-72db6060",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/fleet/oc-code-08-13398-20261123T185609Z-72db6060",
      "repo": "developing-today/code",
      "branch": "lane-oc-code-08-13398",
      "sha": "b7f00be4c0e7a6cb604ca932bd9b7f7a6f17df74"
    },
    "auth_subject": "oc-code-02",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Prove it works
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

When the edge executes a kind itself and an older held action about
the same subject was never handed to a machine, the edge does the
older one itself first under its own name (or drops it as replaced
for last-wins issue.rank). A held action already handed to a machine
in a report answer blocks the newer one instead, which waits behind
it. A settled relayed action drops its stale hold so a later retry
does not re-execute it here. Same-name retries always go back to the
host, which dedups them.

Related issue: #13398
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 86a7afd8-3fbe-42a0-a446-3d1d518a02ad
Commits

Reviewing files that changed from the base of the PR and between ab82a4d and b7f00be.

Files selected for processing: 3

  • pm-stack/console/edge/src/edge.ts
  • pm-stack/console/edge/src/entry.ts
  • pm-stack/console/test/edge.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39

Copy link
Copy Markdown
Member Author

Evidence for queue task 21419 (lane oc-code-02, revalidated fresh 2026-11-23 ~22:40Z; no merge performed here — Archer merges).

PR head verified: b7f00be (unchanged). Checks: no failing required CI (CodeRabbit/Proof skipping). No competing open PR covers #13398. Full evidence record on the issue: #13398 (comment)

Summary: handed set in edge KV; older-first/replaced/blocked ordering in the act route; settled relayed actions drop stale holds. Tests: bun test test/edge.test.ts 112 pass, 0 fail, including the four new ordering tests.

READY TO MERGE (Archer merges).

@dezren39
dezren39 merged commit 80b03a3 into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane-oc-code-08-13398 branch November 23, 2026 23:13
@dezren39 dezren39 added the audit:partial PR partially implemented; gap filed label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit:partial PR partially implemented; gap filed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant